
package com.contractmodule.bean;

import com.companymodule.bean.TbCompany;
import com.companymodule.dao.TbCompanyDAO;
import com.contactmodule.bean.TbContact;
import com.contactmodule.dao.TbContactDAO;
import com.usersmodule.bean.TbUsers;
import com.usersmodule.dao.TbUsersDAO;

public class TbContract implements java.io.Serializable {

    private int contractId;

    private String contractCode;

    private String contractName;

    private int contractType;

    private String contractContent;

    private String startDateSigned;

    private String endDateSigned;

    private int contractState;

    private String contractPrice;

 

    private int companyId;
    private TbCompany tbCompany;

    private String companyContract;

    private int userId;
    private TbUsers tbUsers;

    private int isArchive;

    private String contractSignedTime;
    private String ourCompanyUser;
    private String createTime;
    
    

    public int getContractId(){
        return contractId;
    }

    public void setContractId(int contractId){
        this.contractId = contractId;
    }

    public String getContractCode(){
        return contractCode;
    }

    public void setContractCode(String contractCode){
        this.contractCode = contractCode;
    }

    public String getContractName(){
        return contractName;
    }

    public void setContractName(String contractName){
        this.contractName = contractName;
    }

    public int getContractType(){
        return contractType;
    }

    public void setContractType(int contractType){
        this.contractType = contractType;
    }

    public String getContractContent(){
        return contractContent;
    }

    public void setContractContent(String contractContent){
        this.contractContent = contractContent;
    }

    public String getStartDateSigned(){
        return startDateSigned;
    }

    public void setStartDateSigned(String startDateSigned){
        this.startDateSigned = startDateSigned;
    }

    public String getEndDateSigned(){
        return endDateSigned;
    }

    public void setEndDateSigned(String endDateSigned){
        this.endDateSigned = endDateSigned;
    }

    public int getContractState(){
        return contractState;
    }

    public void setContractState(int contractState){
        this.contractState = contractState;
    }

    public String getContractPrice(){
        return contractPrice;
    }

    public void setContractPrice(String contractPrice){
        this.contractPrice = contractPrice;
    }

   
    public int getCompanyId(){
        return companyId;
    }

    public void setCompanyId(int companyId){
        this.companyId = companyId;
        this.tbCompany=new TbCompanyDAO().getTbCompanyByCompanyId(companyId);
    }
    
    public TbCompany getTbCompany() {
		return tbCompany;
	}

	public void setTbCompany(TbCompany tbCompany) {
		this.tbCompany = tbCompany;
	}

	

	public int getUserId(){
        return userId;
    }

    public void setUserId(int userId){
        this.userId = userId;
        this.tbUsers=new TbUsersDAO().getTbUsersByUserId(userId);
    }

    public TbUsers getTbUsers() {
		return tbUsers;
	}

	public void setTbUsers(TbUsers tbUsers) {
		this.tbUsers = tbUsers;
	}

	public int getIsArchive(){
        return isArchive;
    }

    public void setIsArchive(int isArchive){
        this.isArchive = isArchive;
    }

    public String getCreateTime(){
        return createTime;
    }

    public void setCreateTime(String createTime){
        this.createTime = createTime;
    }

    public String getContractSignedTime() {
		return contractSignedTime;
	}

	public void setContractSignedTime(String contractSignedTime) {
		this.contractSignedTime = contractSignedTime;
	}

	public String getOurCompanyUser() {
		return ourCompanyUser;
	}

	public void setOurCompanyUser(String ourCompanyUser) {
		this.ourCompanyUser = ourCompanyUser;
	}

	public String getCompanyContract() {
		return companyContract;
	}

	public void setCompanyContract(String companyContract) {
		this.companyContract = companyContract;
	}
    public TbContract(){
    }
    public TbContract(String contractCode,String contractName,int contractType,String contractContent,String startDateSigned,String endDateSigned,int contractState,String contractPrice, int companyId,int userId,int isArchive,String companyContract,String  contractSignedTime,String ourCompanyUser){
        this.contractCode = contractCode;
        this.contractName = contractName;
        this.contractType = contractType;
        this.contractContent = contractContent;
        this.startDateSigned = startDateSigned;
        this.endDateSigned = endDateSigned;
        this.contractState = contractState;
        this.contractPrice = contractPrice;
        this.companyId = companyId;
        this.userId = userId;
        this.isArchive = isArchive;
        this.companyContract=companyContract;
        this.contractSignedTime=contractSignedTime;
        this.ourCompanyUser=ourCompanyUser;
    }

	
}

